home *** CD-ROM | disk | FTP | other *** search
- Path: news.rain.org!usenet
- From: "Guus Leeuw jr." <guusl@eiffel.com>
- Newsgroups: comp.lang.c
- Subject: Re: Best way to insert in file
- Date: Tue, 27 Feb 1996 11:27:52 -0800
- Organization: Interactive Software Engineering Inc. http://www.eiffel.com/
- Message-ID: <31335B38.7306EBA@eiffel.com>
- References: <4gldjl$cck@news.fwi.com> <1996Feb25.164738.7783@zcon.com> <4gqvppINNh86@keats.ugrad.cs.ubc.ca>
- NNTP-Posting-Host: @outback.eiffel.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; Linux 1.2.8 i586)
-
- Kazimir Kylheku wrote:
- >
- [snip snip]
- > >19.14: How can I insert or delete a line (or record) in the middle of a
- > > file?
- > >
- > >If you do not have the comp.lang.c FAQ, it can be found at rtfm.mit.edu
- > >in an appropriate subdirectory of /pub/usenet/.
- >
- > Of course, the real answer is to avoid writing a C program, and use a filter
- > utility called "sed". I have used this little program to edit the 200,000+th
- > line of a 400,000 line text file. Writing C code to do the same thing is
- > redundant, considering that sed can do all kinds of things to a file other than
- > just insert and delete lines.
-
- What makes you think that person is using UNIX?
- If the person in question uses DOS / Windows, he still needs a valid answer in C. And
- indeed the FAQ regards this one... ;-)
-
- Regards,
- Guus
-